#pragma once

#include <vector>
#include <string>
#include <iostream>

using std::cout;
using std::endl;

template <typename T>
inline void PrintContainer(const T &container)
{
    for (const auto &elem : container)
        cout << elem << endl;
}

template <typename T>
inline void PrintOptionalContainer(const T &container)
{
    for (const auto &elem : container)
    {
        if (elem)
            cout << elem.value() << endl;
        else
            cout << "元素无效" << endl;
    }
}

template <typename T>
inline void PrintPairContainer(const T &container)
{
    for (const auto &elem : container)
    {
        cout << elem.first << ": " << elem.second << endl;
    }
}